package com.linq.cool.beauty.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.linq.cool.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Author: yqlin
 * @Date: 2021/2/15 22:39
 * @Description: 订单评论
 * @Version: 1.0.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "beauty_order_evaluation")
public class BeautyOrderEvaluation extends BaseEntity {
    /**
     * 主键id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 父id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 商品id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 商品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 订单id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 订单项id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "order_item_id")
    private Long orderItemId;

    /**
     * 类型: 1:普通评论，2: 商家回复，3:追评
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 客户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 客户昵称
     */
    @TableField(value = "member_nickname")
    private String memberNickname;

    /**
     * 客户头像
     */
    @TableField(value = "member_avatar")
    private String memberAvatar;

    /**
     * 评价星数：0->5
     */
    @TableField(value = "star")
    private Integer star;

    /**
     * 评论内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 上传图片地址，以逗号隔开
     */
    @TableField(value = "pics")
    private String pics;
}